using UnityEngine;

[ExecuteInEditMode]
public class PresetsPlatformBalance : MonoBehaviour
{
	public bool includeNuts;

	public float unghiMaxim;

	public bool autoMovement;

	public float autoMovementSpeed;

	public float startDelay;

	private ControllerPlatformBalance controller;

	private void LateUpdate()
	{
		if (!Application.isEditor || Application.isPlaying)
		{
			return;
		}
		if (controller == null)
		{
			controller = base.gameObject.GetComponent<RemoteControl>().controller.GetComponent<ControllerPlatformBalance>();
			includeNuts = controller.includeNuts;
			unghiMaxim = controller.unghiMaxim;
			autoMovement = controller.autoMovement;
			autoMovementSpeed = controller.autoMovementSpeed;
			startDelay = controller.startDelay;
		}
		if (controller != null)
		{
			controller.includeNuts = includeNuts;
			controller.unghiMaxim = unghiMaxim;
			controller.autoMovement = autoMovement;
			if (autoMovement)
			{
				controller.autoMovementSpeed = autoMovementSpeed;
				controller.startDelay = startDelay;
			}
		}
	}
}
